#define _CRT_SECURE_NO_WARNINGS 1
#include "binarytree.h"
#include "queue.h"

void testbinarytree()
{
	char arr[] = "ABD##E##CF##G##";
	int n = sizeof(arr) / sizeof(arr[0]);
	int i = 0;
	BTNode* root = BinaryTreeCreate(arr,n,&i);
	printf("%d\n", BinaryTreeSize(root));
	printf("%d\n", BinaryTreeLeafSize(root));
	printf("%d\n", BinaryTreeLevelKSize(root,3));
	BTNode* ret = BinaryTreeFind(root, 'G');
	printf("%c\n", ret->data);
	BinaryTreePrevOrder(root);
	printf("\n");
	BinaryTreeInOrder(root);	
	printf("\n");
	BinaryTreePostOrder(root);
	printf("\n");
	BinaryTreeLevelOrder(root);
	printf("\n");
	printf("%d ", BinaryTreeComplete(root));

	BinaryTreeDestory(&root);

}

int main()
{
	testbinarytree();
}
